<?php

namespace Medicina\BackendBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class ImpugnacionType extends AbstractType {

    public function buildForm(FormBuilder $builder, array $options) {
        $builder
                ->add('aceptada', 'checkbox', array(
                    'label' => 'Fue aceptada?',
                    'attr' => array('class' => 'span12'),
                    'required' => false,
                ))
                ->add('codigo', 'text', array('attr' => array('class' => 'span12 Expediente')))
                ->add('fechaRecibida', 'date', array(
                    'widget' => 'single_text',
                    'format' => 'dd/MM/yyyy',
                    'attr' => array('class' => 'date span12'),
                    'label' => "Fecha Recibida",
                    'required' => true
                ))
                ->add('fechaResolucion', 'date', array(
                    'widget' => 'single_text',
                    'format' => 'dd/MM/yyyy',
                    'attr' => array('class' => 'date span12'),
                    'label' => "Fecha Resolucion",
                    'required' => false
                ))
          
                ->add('observacion', 'textarea', array('attr' => array('class' => "textarea-input span12"), 'required' => false))
        ;
    }

    public function getDefaultOptions(array $options) {
        return array('data_class' => 'Medicina\KernelBundle\Entity\Impugnacion');
    }

    public function getName() {
        return 'ImpugnacionType';
    }

}
